vcRoutingRule
vcRoutingRule allows you to define rules for transferring components to different connectors, thereby simulating routing rules for material flow.
See in: Overview
Module: vcBehaviors
Parent: vcContainer
Children -
Referenced by: -
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| FlowProxy | vcComponentFlowProxy | RW | Gets or sets if a proxy is used to check capacity of selected connector before routing a component. If None, this property is ignored. |
| RuleComponent | vcRoutingComponentMethod | RW | Gets or sets the component method used for rule processing. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| createConnector | Integer | None | Adds a new connector in routing rule. Returns: int: Index of the new connector. |
| deleteConnector | None | Integer index | Deletes a connector from routing rule.See moreParameters: index (int): Index of the connector to delete from list. Exceptions: IndexError: When given index is out of bounds. |
| processRoute | Integer | Integer fromConnectorIndex, vcComponent component, vcFlow OR None flowBehavior | Returns the result of a routing test to verify if a given component would be routed based on a capacity test performed by a given vcFlow behavior.See moreDepending on the value of RuleComponent, the component can be either: The arriving component (if RuleComponent == VC_ROUTING_PROCESSED) The owner component of the behavior (if RuleComponent == VC_ROUTING_OWNER) Parameters: fromConnectorIndex (int): The index of the connector from which to route. component (vcComponent): Component to verify routing with. flowBehavior (vcFlow): Flow behavior to use for the check. Returns: int: -1 when no valid targets are found. |
| setTarget | None | Integer index | Sets the connector by index for routing a component, which should be executed in OnRoute event. Parameters: index (int): The index of the connector. |
Events
Learn how to use events here. The events are also inherited from the parent class.
| Name | Parameters | Description |
| OnRoute | int connector, vcComponent component, vcFlow flow | Triggered when a component is transferred into routing rule and being processed. Use the processRoute() method to test a viable option, and then use setTarget() method to override default routing logic. See moreParameters: connector (int): Index of the connector used. component (vcComponent): The component being processed. flow (vcFlow): Behavior used to perform a capacity test. |